package com.cdut.hwadeefsc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cdut.hwadeefsc.entity.articles;
import com.cdut.hwadeefsc.service.articlesService;
import com.cdut.hwadeefsc.mapper.articlesMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 1
* @description 针对表【articles(文章表)】的数据库操作Service实现
* @createDate 2025-09-15 15:08:59
*/
@Service
public class articlesServiceImpl extends ServiceImpl<articlesMapper, articles>
    implements articlesService{ @Resource
private articlesMapper articlesMapper;

    @Override
    public int post(articles articles) {
        return articlesMapper.post(articles);
    }

    @Override
    public List<articles> get() {
        return articlesMapper.get();
    }

    @Override
    public articles getById(Long id) {
        return articlesMapper.getById(id);
    }

    @Override
    public int modify(articles articles) {
        return articlesMapper.modify(articles);
    }

    @Override
    public int delete(Long id) {
        return articlesMapper.delete(id);

    }
}




